namespace :assets do
  ASSETS_DIR = "assets/"
  task :create do
    mkdir_p ASSETS_DIR
  end
  task :delete do
    rm_rf ASSETS_DIR
  end
  task :link, :source, :target do |t,args|
    sh "ln -s #{args[:source]} #{args[:target]}"
  end
  task :clean do
    if (Dir.entries(ASSETS_DIR).size == 2) 
      Rake::Task["assets:delete"].invoke
    end
  end
end
